<ion-header>
    <ion-toolbar content-page>
        <ion-buttons left>
            <button ion-button navPop>
                <i class="backIcon"></i>
            </button>
        </ion-buttons>
        <ion-title>
            活动筛选
        </ion-title>
        <!--<ion-buttons end>-->
        <!--<button ion-button icon-only adpmenutoggle>-->
        <!--<i class="toolbar-menu"></i>-->
        <!--</button>-->
        <!--</ion-buttons>-->
    </ion-toolbar>
</ion-header>
<ion-content>
    <div class="content-rel">
        <div class="row row-title">
            <div>活动状态</div>
        </div>
        <div class="row">
            <div class="filter-btn filter-btn_long" (click)="setFilter('status', 0)"
                 [ngClass]="{'filter-btn_selected': filter.status.indexOf(0) !== -1}">
                未开始
            </div>
            <div class="filter-btn filter-btn_long" (click)="setFilter('status', 1)"
                 [ngClass]="{'filter-btn_selected': filter.status.indexOf(1) !== -1}">
                进行中
            </div>
            <div class="filter-btn filter-btn_long" (click)="setFilter('status', 2)"
                 [ngClass]="{'filter-btn_selected': filter.status.indexOf(2) !== -1}">
                已结束
            </div>
        </div>
        <div class="row row-title">
            <div>活动开始时间</div>
            <button class="clear-btn" (click)="clearDate()" *ngIf="clearShow()">清除</button>
        </div>
        <div class="row">
            <ion-datetime cancelText="取消" doneText="确定" displayFormat="YYYY/MM/DD" pickerFormat="YYYYMMDD"
                          yearValues="{{yearList}}" (ionChange)="validateForm()"
                          [class.error_input]="!canSubmit"
                          [pickerOptions]="pickerOption" [(ngModel)]="filter.startTime">
            </ion-datetime>
            <div class="datetime-Separator"></div>
            <ion-datetime cancelText="取消" doneText="确定" displayFormat="YYYY/MM/DD" pickerFormat="YYYYMMDD"
                          yearValues="{{yearList}}" (ionChange)="validateForm()"
                          [class.error_input]="!canSubmit"
                          [pickerOptions]="pickerOption" [(ngModel)]="filter.endTime">
            </ion-datetime>
        </div>
    </div>
</ion-content>
<ion-footer>
    <ion-row>
        <ion-col>
            <button ion-button (click)="resetFilter()" class="foot-btn_reset">重置</button>
        </ion-col>
        <ion-col>
            <button ion-button class="foot-btn_done" [disabled]="!canSubmit" (click)="searchActivity()">完成</button>
        </ion-col>
    </ion-row>
</ion-footer>
